<?
session_start();

require_once('class/cls_product.php');
require_once('config.php');


$product			= new cls_product();


if ($_POST['brand']=="" || $_POST['brand'] == null)
{
	$object			= $product->get_product_search($_POST);	
}//if
else
{
	$brand_id		= $_POST['brand'];//brandid= coordinator_id
	
	
	$object		= $product->get_product_by_brand($brand_id);
	
}//else

?>
<html>
<head>
<title>Product List <?= $brand ?></title>
<link href="style.css" type="text/css" rel="stylesheet">
<link href="../soethida/um_sty.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#F7F9F0">
<table id="Table_01" width="775" height="32" align="center" border="0" cellpadding="0" cellspacing="0">

	<tr>

		<td width="233" height="32"><img src="images/banner.jpg" width="774" height="100" alt=""></td>

		
	</tr>
</table>  
<table id="Table_02" width="775" height="24" align="center" bgcolor="#000000" border="0" cellpadding="0" cellspacing="0">

	<tr>

		<td width="544" align="left" valign="middle">

		&nbsp;&nbsp;&nbsp;<a href="index.php" class="ummenu">Home</a>


		

		&nbsp;&nbsp;&nbsp;&nbsp;
		
		<a href="customer_service.php" class="ummenu">Customer Services</a>
		
		&nbsp;&nbsp;&nbsp;&nbsp;

		<a href="contact_us.php" class="ummenu">Contact Us</a>
		
		&nbsp;&nbsp;&nbsp;&nbsp;

		<a href="aboutus.php" class="ummenu">About Us</a>


		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

		<td width="231" height="24" align="right" valign="middle"><a href="http://66.94.233.46/babelfish/trurl_pagecontent?lp=en_ja&trurl=http%3a%2f%2fwww.umgroups.com">

		</a>&nbsp;&nbsp;

		<a href="http://66.94.233.46/babelfish/trurl_pagecontent?lp=en_zt&trurl=http%3a%2f%2fwww.umgroups.com">		</a>&nbsp;&nbsp;

		<a href="http://66.94.233.46/babelfish/trurl_pagecontent?lp=en_ko&trurl=http%3a%2f%2fwww.umgroups.com">		</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>

	</tr>

</table>

<!-- Results table -->
<table id="Table_01" width="775" border="0" cellpadding="0" cellspacing="0" align="center" bgcolor="#FFFFFF" style="border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC" >
<tr>
	<td valign="top">
	<form action="um_products.php" method="post">
	<table cellpadding="1" cellspacing="1" width="100%">
	<tr>
		<td width="90%" valign="top" align="left">
		<table width="100%" align="left">
<?

		if (count($object) > 0)
		{
	
			foreach ($object as $row) {
				?>
				<tr>
					<td align="left">
					<table border="0px" cellpadding="0px" cellspacing="0px" width="100%">
					  <tr>
					    <td colspan="2" height="20px">&nbsp;</td>
				      </tr>
					  <tr>
						<td bgcolor="#cccccc" colspan="2" height="20"><b>&nbsp;<?= $row['brand'] ?>	</b>				</td>
					  </tr>
					  <tr>
						<td width="100" valign="middle" align="left" rowspan="2" style="padding: 5px;"><img src="um-img/<?= $row['product_id'].".jpg" ?>" align="right" width="100" height="75"></td>
						<td valign="top" align="left">
						<?= $row['type'] ?></td>
					  </tr>
					  <tr>
						<td valign="top">
							<?= $row['price'] ?>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<a href="sales_info.php?id=<?= $row['product_id'] ?>"><img src="images/AddToBasket.gif"></a>						</td>
					  </tr>
					  
					  
					 
					  
					</table>					</td>
				</tr>
<?			}//for
		}//if
		

?>
		</table>		</td>
	</tr>
	</table></form>	
	<table align="center" border="0" cellpadding="0" cellspacing="0" width="775" id="table6" bgcolor="#FFFFFF" style="border-bottom: 3px solid #DF8A0B;">


			<tr>
			  <td height="2" colspan="2" bgcolor="#CCCCCC" class="foot"></td>
	    </tr>
			<tr>

				<td height="30" colspan="2" class="foot">&nbsp;</td>
			</tr>

			<tr>

				<td class="foot" align="center" colspan="2">&nbsp;</td>
			</tr>

			<tr>

				<td class="copy" style="padding-left: 3px" colspan="2">&nbsp;</td>
			</tr>

			<tr>

				<td class="copy" style="padding-left: 3px" width="50%">&nbsp;</td>

				<td class="copy" style="padding-right:3px" align="right" width="50%" valign="top">&nbsp;</td>
			</tr>

			<tr>

				<td height="30" colspan="2" class="foot">&nbsp;</td>
			</tr>
		</table></td>
  </tr>
</table>

</body>
</html>